import React from "react";
import {PageLoader} from "@/components/Loading";

const LazyLoad = (Comp: React.LazyExoticComponent<any>): React.ReactNode => {
    return (
        <React.Suspense fallback={<PageLoader/>}>
            <Comp/>
        </React.Suspense>
    );
};

export default LazyLoad;
